package com.kvn.mockj;

import org.apache.commons.lang3.RandomUtils;

import java.util.Random;

public class Basic {
    private static final Random RANDOM = new Random();

    public static int natural(int max){
        return natural(0, max);
    }
    public static int natural(int min, int max){
        if(min == 0 && max == 0){
            return RANDOM.nextInt();
        } if(min == 0 && max > 0) {
            return RANDOM.nextInt(max);
        } else {
            return RandomUtils.nextInt(min, max + 1);
        }
    }
}
